-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add VERSION file update with gitversion semver on checkout #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: tomgrv <[email protected]>
Co-authored-by: tomgrv <[email protected]>
Co-authored-by: tomgrv <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot update package version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements automatic VERSION file updates using GitVersion semver on checkout to provide developers with visibility into their current working version.
- Added a VERSION file that gets automatically updated with semver information
- Created an intelligent version update script that tries GitVersion first, then falls back to git describe
- Enhanced the post-checkout hook to automatically update the VERSION file on branch/commit switches
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
update-version.sh | New script that determines current version using GitVersion or git describe fallback |
src/githooks/_post-checkout.sh | Enhanced to call the version update script automatically |
VERSION | New file containing the current version string |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Le fichier version ne doit pas être comité dans le repos
Co-authored-by: Copilot <[email protected]>
6f46e7d
to
b06abdf
Compare
* Initial plan * feat: add VERSION file update with gitversion semver on checkout Co-authored-by: tomgrv <[email protected]> * fix: improve version extraction logic for better semver detection Co-authored-by: tomgrv <[email protected]> * feat: add VERSION file update with gitversion semver on checkout Co-authored-by: tomgrv <[email protected]> * feat: support flexible naming Co-authored-by: Copilot <[email protected]> * fix: 🐛 handle legitimate naming Co-authored-by: Copilot <[email protected]>
This PR implements automatic VERSION file updates with GitVersion semver on each checkout, allowing developers to easily see what version they're currently working on.
Changes Made
1. Created VERSION File
VERSION
file in the repository root that gets automatically updated1.0.0
and managed by the version update system2. Version Update Script
Created
update-version.sh
that intelligently determines the current version:The script handles various scenarios:
feature_larasets_5.10.2
→5.10.2-2-g51926a7
3. Enhanced Post-Checkout Hook
Modified
src/githooks/_post-checkout.sh
to automatically call the version update script:How It Works
cat VERSION
to see their current working versionExample Usage
This integrates seamlessly with the existing GitVersion configuration and devcontainer features workflow, requiring no manual intervention once the githooks feature is installed and configured.
Fixes #10.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.